
// 系统用的常量
enum CoordinateSystem {
    GRID_SIZE = 20,  // N*N的网格组,网格大小
    
}

// 字体family
enum FontFamily {
    HEITI = "黑体",
    SONGTI = "宋体",
    KAITI = "楷体",
    SHISHANG = "shishang",
    YOUSHE = "youshe",
    ZONGYI = "zongyi",
}

enum GridStyle {
    FULLSCREEN,
    RANGE,
    CROSSLINE,
}

// 控制点方位
enum CtrlType {
    SIZE_CTRL = "sizeCtrl",
    ANGLE_CTRL = "angleCtrl",
    WIDTH_CTRL = "widthCtrl",
    HEIGHT_CTRL = "heightCtrl",
    ANCHOR_CTRL = "anchorCtrl",
    PNT_CTRL = "pnt_ctrl",
    BEZIER_CTRL = "bezier_ctrl",
    ROTATE_DIST = 25,
    // BEZIER_POINT = "bezierPoint"  // 贝塞尔曲线控制点
}

// link的起点终点标识
enum LinkMark {
    START = "start",
    END = 'end',
}

// 自定义事件名称
enum Events {
    TOUCHSTART = 'touchstart', // 移动端按下时(原生)
    TOUCHEND = 'touchend', // 移动端松开时(原生)
    TOUCHMOVE = 'touchmove',  // 移动端在目标上移动时(原生)
    MOUSE_UP = 'mouseup', // 鼠标松开时(原生)
    MOUSE_DOWN = 'mousedown', // 鼠标按下时(原生)
    CLICK = 'click', // 鼠标按下时(原生)
    DBLCLICK = 'dblclick', // 鼠标按下时(原生)
    ZOOM = 'mousewheel',  // 滚轮滚动时(原生)
    MOUSE_MOVE = 'mousemove',  // 鼠标在目标上移动时(原生)
    MOUSE_ENTER = 'mouseover',  // 鼠标进入时(原生)
    MOUSE_LEAVE = 'mouseleave',  // 鼠标移开时(原生)
    CONTEXTMENU = 'contextmenu',  // 鼠标右键上下文(原生)
    DRAW = 'draw',   // 绘制画布所有元素时
    BLUR = 'blur',  // 失去焦点时
    FOCUS = 'focus',  // 获取焦点时
    RIGHT_CLICK = 'right-click',   // 双击时
    DRAG_START = 'drag_start',
    DRAG = 'drag',  // 拖拽时
    DRAG_END = 'drag-end',  // 拖拽结束时
    ADD = 'add', // 元素删除时
    DELETE = 'delete', // 元素删除时
    RESIZE = 'resize', // 元素形变时
    CHANGE = 'change', // 元素形变时
    ROTATE = 'rotate', // 元素旋转时
    SELECTED = 'selected', // 元素旋转时
    CHANGED = 'changed', // 元素发生变化时,比如拖拽,形变,旋转
    EDIT = 'edit', // 元素旋转时
    RIGHT_BTN = 2, // 元素旋转时
    LEFT_BTN = 1, // 元素旋转时
    LOADED = 'loaded', // 图片或资源加载完成时
    TRANSLATE = 'translate', //画布或元素移动时
}

// 线段样式
enum LinkStyle {
    CURVE2_HORIZINAL,  // 2次贝塞尔曲线
    CURVE2_VERTIVAL,  // 2次贝塞尔曲线
    STRAIGHT,  // 2次贝塞尔曲线
    DEFAULT,  // 直线
    CURVE3_HORIZINAL,  // 3次贝塞尔曲线
    CURVE3_VETIVAL,  // 3次贝塞尔曲线
    BROKEN2,  // 折线
    BROKEN1,  // 折线
    AUTOEDGE_STRAIGHT,  // 直线
    AUTOEDGE_CURVE,  // 曲线
    AUTOEDGE_BROKEN2,   // 自动边锚点, 折线连接
    AUTOEDGE_BROKEN1, // 自动边锚点, 折线连接
    AUTOEDGE_BROKEN_DIAGONAL,   // 自动边锚点 斜线连接
    AUTOEDGE_ASTAR,   // 自动边锚点 斜线连接
    FIXEDEDGE_ASTAR,  // 固定边 a*
}

// 对齐配置类型
enum AdsorbType {
    GRID = 'grid',
    FEATURE = 'feature',
    POINT = 'point',
}

// 选中模式
enum SelectMode {
    ALL_P = 'all',
    ONE_P = 'one',
    MOUSEDOWN = 'mousedown',
}

// SelectArea选中模式
enum AreaSelectMode {
    RECT = 'rect',  // 矩形范围
    IRREGULAR = 'irregular',  // 不规则几何形范围
}
// 方位
enum AlignType {
    TOP,
    LEFT,
    BOTTOM,
    RIGHT,

    LEFT_TOP,
    LEFT_BOTTOM,
    RIGHT_BOTTOM,
    RIGHT_TOP,

    CENTER,
    HORIZONAL,
    VERTICAL,
}
// 类名, 为什么不用constructor.className?因为打包后会乱码,无法判断
enum ClassName {
    IMG = 'img',
    VIDEO = 'video',
    CIRCLE = 'circle',
    LINE = 'line',
    CURVELINE = 'curveline',
    PEN = 'pen',
    LINK = 'link',
    RECT = 'rect',
    TEXT = 'text',
    CTRLPNT = 'ctrlpnt',
    BCTRLPNT = 'bctrlpnt',
    RCTRLPNT = 'rctrlpnt',
    ACTRLPNT = 'actrlpnt',
    ADSORBPNT = 'adsorbpnt',
    BBOX = 'bbox',
    GROUP = 'group',
    PNT = 'pnt',
    SELECTAREA = 'selectarea',
    GRIDSYSTEM = 'gridsystem',
    MINIMAP = 'minimap',
    FEATURE = 'feature',
    ARROW = 'arrow',
}

// 点的Shape
enum Shape {
    RECT,  // 矩形范围
    CIRCLE,  // 不规则几何形范围
    ARROW, // 箭头
}

enum PntTag {
    ORIGIN,
    CTRLP,
}

export {
    CoordinateSystem,
    CtrlType,
    LinkMark,
    Events,
    LinkStyle,
    FontFamily,
    AdsorbType,
    SelectMode,
    AreaSelectMode,
    AlignType,
    ClassName,
    Shape,
    PntTag,
    GridStyle,
}